<div id="main-alt">
<ul id="tab_nav" class="tab_nav">
  <li><a href="#new_wiki" class="active">New <%= class_name %> Page</a></li>
  <li><a href="#new_<%= file_name %>_asset">Upload Files</a></li>
</ul>

<div id="wikiContent">
<div id="new_wiki">
<%= error_messages_for :<%= file_name %>_page %>

<% form_for(@<%= file_name %>_page, :url => "/wiki") do |f| %>
  <p><label for="title">Title:</label><br/>
  <%= text_field_tag "<%= file_name %>_page[title]", (@<%= file_name %>_page.title.gsub('_'," ") if @<%= file_name %>_page.title), :id => "<%= file_name %>_page_title" %></p>

  <p><label for="body">Main Body:</label><br/>
  <%= text_area_tag "<%= file_name %>_body" %></p>
  

  <%= javascript_include_tag "multi-text-input.js" %>
  <p>
  
  <%= multi_tag_input("tags", @<%= file_name %>_page.tag_list_on(:categories), "Categories:", "Type the categories for this wiki entry separated by a comma") %>
                              
  </p>
  
  <p>

  </p>
<% end %>

<p>  
<%= form_remote_tag(:url => preview_<%= file_name %>_path, :method => :post, :update => "<%= file_name %>_preview", :html => {:id => "<%= file_name %>_preview_form"}) %>
<%= hidden_field_tag "preview", nil %>
<%= submit_tag("Preview", :onclick=> "javascript:document.forms['<%= file_name %>_preview_form'].preview.value=document.forms['new_<%= file_name %>_page'].<%= file_name %>_body.value;") %>
</form>
<%= button_to_function "Save <%= class_name %> Page", "javascript:document.forms['new_<%= file_name %>_page'].submit();" %>
</p>

<div id="<%= file_name %>_preview"></div>
</div><!-- END New<%= class_name %> -->

<div id="new_<%= file_name %>_asset" style="display:none;">
  <%= render :partial => "<%= file_name %>_assets/remote_form" %>
</div>

<script type="text/javascript">
  new Control.Tabs('tab_nav');
</script>
</div><!-- END <%= class_name %>Content -->
</div><!-- END Main -->

<div id="secondary-alt">
<div id="wiki-navigation">
<h3>Formatting wiki pages</h3>
<table id="wiki-format">
  <tbody><tr><td>_italics_</td><td class="arrow">→</td><td><em>italics</em></td></tr>
  <tr><td>*bold*</td><td class="arrow">→</td><td><strong>bold</strong></td></tr>
  <tr><td>%{color:red}hi%</td><td class="arrow">→</td><td><span style="color: red;">hi</span></td></tr>
  <tr><td>|a|table|row|<br>|b|table|row|</td><td class="arrow">→</td><td>Table</td></tr>
  
  <tr><th colspan="3"><h3>Lists</h3></th></tr>
  <tr><td>* 1st item<br>* 2nd item</td><td class="arrow">→</td><td>• 1st item<br>• 2nd item</td></tr>
  <tr><td># 1st item<br># 2nd item</td><td class="arrow">→</td><td>1. 1st item<br>2. 2nd item</td></tr>
  
  <tr><th colspan="3"><h3>External Links</h3></th></tr>
  <tr><td colspan="3">"FIBT":http://fibt.com</td></tr>
  <tr><td class="arrow">→ <a href="http://fibt.com">FIBT</a></td></tr>
  <!--<tr><td>http://url<br>email@address.com</td><td class="arrow">→</td><td>Auto-linked</td></tr> -->

  <tr><th colspan="3"><h3><%= class_name %> Links</h3></th></tr>
  <tr><td>[[<%= class_name %>_Page]]</td><td class="arrow">→</td><td><a href="/wiki/<%= class_name %>_Page"><%= class_name %>_Page</a></td></tr>
  <tr><td>[[Link|Page]]</td><td class="arrow">→</td><td><a href="/wiki/Page">Link</a></td></tr>

  <tr></tr>
  <tr><td colspan="3" class="text-center"><%= link_to "More <%= class_name %> Formatting", <%= file_name %>_path("<%= class_name %>_Formatting"), :target => "_blank", :class => "text-center external_link"%></td></tr>
</tbody></table>
</div>
</div>
